package avicit.bdp.dms.perm.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2022-10-09
 * @类说明：BasePermDto
 * @修改记录：
 * @注意事项：
 * @主要功能：权限管理基本Dto
 */
public class BasePermDTO extends BaseDTO {
    /**
     * 主键
     */
    @Id
    @LogField
    @ApiModelProperty(value = "主键")
    @FieldRemark(column = "id", field = "id", name = "id")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 权限名称
     */
    @LogField
    @ApiModelProperty(value = "权限名称")
    @FieldRemark(column = "name", field = "name", name = "权限名称")
    @Column(name = "name")
    private String name;

    /**
     * 权限描述
     */
    @LogField
    @ApiModelProperty(value = "权限描述")
    @FieldRemark(column = "remark", field = "remark", name = "权限描述")
    @Column(name = "remark")
    private String remark;

    /**
     * 作用
     */
    @LogField
    @ApiModelProperty(value = "作用，0：允许执行，1：不允许执行")
    @FieldRemark(column = "effect", field = "effect", name = "权限分类")
    @Column(name = "effect")
    private Integer effect;

    /**
     * 授权项
     */
    @LogField
    @ApiModelProperty(value = "授权项，0：查看，1：编辑，2：数据查看")
    @FieldRemark(column = "action", field = "action", name = "授权项")
    @Column(name = "action")
    private Integer action;

    /**
     * 授权项
     */
    @LogField
    @ApiModelProperty(value = "授权维度，0：角色")
    @FieldRemark(column = "dimension", field = "dimension", name = "授权维度")
    @Column(name = "dimension")
    private Integer dimension;

    /**
     * 授权角色ID
     */
    @LogField
    @ApiModelProperty(value = "授权角色ID")
    @FieldRemark(column = "role_id", field = "roleId", name = "授权角色ID")
    @Column(name = "role_id")
    private String roleId;

    /**
     * 关联授权
     */
    @LogField
    @ApiModelProperty(value = "关联授权，0：非关联，1：关联，用于分区父子节点权限不同时，如何确定子节点展示的真实权限")
    @FieldRemark(column = "related", field = "related", name = "关联授权")
    @Column(name = "related")
    private Integer related;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getEffect() {
        return effect;
    }

    public void setEffect(Integer effect) {
        this.effect = effect;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    public Integer getDimension() {
        return dimension;
    }

    public void setDimension(Integer dimension) {
        this.dimension = dimension;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public Integer getRelated() {
        return related;
    }

    public void setRelated(Integer related) {
        this.related = related;
    }

    @Override
    public String toString() {
        return "BasePermDTO{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", remark='" + remark + '\'' +
                ", effect=" + effect +
                ", action=" + action +
                ", dimension=" + dimension +
                ", roleId='" + roleId + '\'' +
                ", related=" + related +
                '}';
    }
}
